window.addEvent("domready",
function() {
    $$("#waterfall").length && $$("#waterfall")[0].addEvents({
        "mouseenter:relay(.pin)": function() {
            this.getElement(".actions") && this.getElement(".actions").setStyle("visibility", "visible"),
            this.getElement(".shiji-actions") && this.getElement(".shiji-actions").setStyle("visibility", "visible")
        },
        "mouseleave:relay(.pin)": function() {
            this.getElement(".actions") && this.getElement(".actions").setStyle("visibility", "hidden"),
            this.getElement(".shiji-actions") && this.getElement(".shiji-actions").setStyle("visibility", "hidden")
        }
    });
    if ($$(".pin-img img").length) {
        var e = 554,
        t = $$(".pin-img img")[0];
        t.getStyle("width").toInt() > e && t.setStyle("width", e)
    }
    Browser.ie6 && $$("#pin_toolbar").length && $$("#pin_toolbar .more")[0].addEvents({
        mouseenter: function() {
            this.store("mouse-on-me", !0),
            this.getElement(".more-btns").setStyle("display", "block")
        },
        mouseleave: function() {
            this.store("mouse-on-me", !1),
            function() {
                this.retrieve("mouse-on-me") || this.getElement(".more-btns").setStyle("display", "none")
            }.delay(500, this)
        }
    })
});